package com.study.pojo;

import java.util.Date;
import java.util.Objects;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * @PackgeName: com.study.pojo
 * @ClassName: AdminInfo
 * @Author: 严志祥
 * Date: 2022-05-04 15:30
 * project name: web_project_medal
 * @Version:
 * @Description:
 */
public class AdminInfo{
    private Integer adminId;
    private String adminName;
    private String adminPassword;
    @JSONField(format = "yyyy-MM-dd")
    private Date adminTime;

    public AdminInfo() {
    }

    public AdminInfo(String adminName, String adminPassword, Date adminTime) {
        this.adminName = adminName;
        this.adminPassword = adminPassword;
        this.adminTime = adminTime;
    }

    public AdminInfo(Integer adminId, String adminName, String adminPassword, Date adminTime) {
        this.adminId = adminId;
        this.adminName = adminName;
        this.adminPassword = adminPassword;
        this.adminTime = adminTime;
    }

    public Integer getAdminId() {
        return adminId;
    }

    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    public String getAdminName() {
        return adminName;
    }

    public void setAdminName(String adminName) {
        this.adminName = adminName;
    }

    public String getAdminPassword() {
        return adminPassword;
    }

    public void setAdminPassword(String adminPassword) {
        this.adminPassword = adminPassword;
    }

    public Date getAdminTime() {
        return adminTime;
    }

    public void setAdminTime(Date adminTime) {
        this.adminTime = adminTime;
    }

    @Override
    public String toString() {
        return "AdminInfo{" +
                "adminId=" + adminId +
                ", adminName='" + adminName + '\'' +
                ", adminPassword='" + adminPassword + '\'' +
                ", adminTime=" + adminTime +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AdminInfo adminInfo = (AdminInfo) o;
        return Objects.equals(adminId, adminInfo.adminId) && Objects.equals(adminName, adminInfo.adminName) && Objects.equals(adminPassword, adminInfo.adminPassword) && Objects.equals(adminTime, adminInfo.adminTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(adminId, adminName, adminPassword, adminTime);
    }
}
